<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>TMCStepper: src/source/TMC2160Stepper.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">TMCStepper
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('_t_m_c2160_stepper_8cpp_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">TMC2160Stepper.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_t_m_c2160_stepper_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_t_m_c_stepper_8h.html">TMCStepper.h</a>&quot;</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_t_m_c___m_a_c_r_o_s_8h.html">TMC_MACROS.h</a>&quot;</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160; </div>
<div class="line"><a name="l00004"></a><span class="lineno"><a class="line" href="class_t_m_c2160_stepper.html#a4ba0721dce0f73b4438c497b27263543">    4</a></span>&#160;<a class="code" href="class_t_m_c2160_stepper.html#a4ba0721dce0f73b4438c497b27263543">TMC2160Stepper::TMC2160Stepper</a>(uint16_t pinCS, <span class="keywordtype">float</span> RS, int8_t link) : <a class="code" href="class_t_m_c2130_stepper.html">TMC2130Stepper</a>(pinCS, RS, link)</div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;  { <a class="code" href="class_t_m_c2160_stepper.html#a5e55442fa6cd92580197a8a0d34208b1">defaults</a>(); }</div>
<div class="line"><a name="l00006"></a><span class="lineno"><a class="line" href="class_t_m_c2160_stepper.html#ad08024cd60ea809df87695cf797095c4">    6</a></span>&#160;<a class="code" href="class_t_m_c2160_stepper.html#a4ba0721dce0f73b4438c497b27263543">TMC2160Stepper::TMC2160Stepper</a>(uint16_t pinCS, <span class="keywordtype">float</span> RS, uint16_t pinMOSI, uint16_t pinMISO, uint16_t pinSCK, int8_t link) :</div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html">TMC2130Stepper</a>(pinCS, RS, pinMOSI, pinMISO, pinSCK, link)</div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;  { <a class="code" href="class_t_m_c2160_stepper.html#a5e55442fa6cd92580197a8a0d34208b1">defaults</a>(); }</div>
<div class="line"><a name="l00009"></a><span class="lineno"><a class="line" href="class_t_m_c2160_stepper.html#a0c84e1242e09dfc863987c5370a6aaf4">    9</a></span>&#160;<a class="code" href="class_t_m_c2160_stepper.html#a4ba0721dce0f73b4438c497b27263543">TMC2160Stepper::TMC2160Stepper</a>(uint16_t pinCS, uint16_t pinMOSI, uint16_t pinMISO, uint16_t pinSCK, int8_t link) :</div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html">TMC2130Stepper</a>(pinCS, default_RS, pinMOSI, pinMISO, pinSCK, link)</div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;  { <a class="code" href="class_t_m_c2160_stepper.html#a5e55442fa6cd92580197a8a0d34208b1">defaults</a>(); }</div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160; </div>
<div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="class_t_m_c2160_stepper.html#a7ee48b042245ef5b3968b82029d1404c">   13</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c2160_stepper.html#a7ee48b042245ef5b3968b82029d1404c">TMC2160Stepper::begin</a>() {</div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;  <span class="comment">//set pins</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;  pinMode(<a class="code" href="class_t_m_c2130_stepper.html#a6d38cdca5d67036d37e2de754ad6a8e4">_pinCS</a>, OUTPUT);</div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#aed8aa4583943e649dbf3bb1c1da90d63">switchCSpin</a>(HIGH);</div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160; </div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;  <span class="keywordflow">if</span> (<a class="code" href="class_t_m_c2130_stepper.html#a4bf494535fd27013899cc325c8b7af4c">TMC_SW_SPI</a> != <span class="keyword">nullptr</span>) <a class="code" href="class_t_m_c2130_stepper.html#a4bf494535fd27013899cc325c8b7af4c">TMC_SW_SPI</a>-&gt;<a class="code" href="class_s_w___s_p_i_class.html#aa35a68a7e184e42445f391876e58dd68">init</a>();</div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160; </div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#aee84a9abfc84b387c6ae5658f90bf684">GCONF</a>(GCONF_register.sr);</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#a67541b27d97ce45f175e9f6e4a2d0bff">CHOPCONF</a>(CHOPCONF_register.sr);</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#abc48be984238d94bb3b72ed3aa26f028">COOLCONF</a>(COOLCONF_register.sr);</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;  <a class="code" href="class_t_m_c2160_stepper.html#ae59c6240979e95e7b05074e20f3600de">PWMCONF</a>(PWMCONF_register.sr);</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;  <a class="code" href="class_t_m_c_stepper.html#a597bc308bad0d1198b98c48a6ef34fc3">IHOLD_IRUN</a>(IHOLD_IRUN_register.sr);</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160; </div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#ac34bf4add4f669e935f2a91e1b42817c">toff</a>(8); <span class="comment">//off_time(8);</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#ae54d816846ca2103976f490c5ab8e887">tbl</a>(1); <span class="comment">//blank_time(24);</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;}</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160; </div>
<div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="class_t_m_c2160_stepper.html#a5e55442fa6cd92580197a8a0d34208b1">   30</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c2160_stepper.html#a5e55442fa6cd92580197a8a0d34208b1">TMC2160Stepper::defaults</a>() {</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;  SHORT_CONF_register.s2vs_level = 6;</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;  SHORT_CONF_register.s2g_level = 6;</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;  SHORT_CONF_register.shortfilter = 0b01;</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;  SHORT_CONF_register.shortdelay = 0;</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;  DRV_CONF_register.bbmtime = 0;</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;  DRV_CONF_register.bbmclks = 4;</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;  DRV_CONF_register.otselect = 0b00;</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;  DRV_CONF_register.drvstrength = 0b10;</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;  DRV_CONF_register.filt_isense = 0b00;</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;  TPOWERDOWN_register.sr = 10;</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;  <span class="comment">//MSLUT0_register.sr = ???;</span></div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;  <span class="comment">//MSLUT1_register.sr = ???;</span></div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;  <span class="comment">//MSLUT2_register.sr = ???;</span></div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;  <span class="comment">//MSLUT3_register.sr = ???;</span></div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;  <span class="comment">//MSLUT4_register.sr = ???;</span></div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;  <span class="comment">//MSLUT5_register.sr = ???;</span></div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;  <span class="comment">//MSLUT6_register.sr = ???;</span></div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;  <span class="comment">//MSLUT7_register.sr = ???;</span></div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;  <span class="comment">//MSLUTSEL_register.sr = ???;</span></div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;  <span class="comment">//MSLUTSTART_register.start_sin = 0;</span></div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;  <span class="comment">//MSLUTSTART_register.start_sin90 = 247;</span></div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;  CHOPCONF_register.sr = 0x10410150;</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;  PWMCONF_register.sr = 0xC40C001E;</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;}</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160; </div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;<span class="comment">  Requested current = mA = I_rms/1000</span></div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;<span class="comment">  Equation for current:</span></div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;<span class="comment">  I_rms = GLOBALSCALER/256 * (CS+1)/32 * V_fs/R_sense * 1/sqrt(2)</span></div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;<span class="comment">  Solve for GLOBALSCALER -&gt;</span></div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;<span class="comment"></span> </div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;<span class="comment">                 32 * 256 * sqrt(2) * I_rms * R_sense    |</span></div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;<span class="comment">  GLOBALSCALER = ------------------------------------    |</span></div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;<span class="comment">                           (CS + 1) * V_fs               | V_fs = 0.325</span></div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;<span class="comment"></span> </div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;<span class="comment">*/</span></div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="class_t_m_c2160_stepper.html#a90a23ccb351310ef8f74a6a9f7953042">   67</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c2160_stepper.html#a05142aa741a7ebd105a13df39fba9d91">TMC2160Stepper::rms_current</a>(uint16_t mA) {</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;  constexpr uint32_t V_fs = 325; <span class="comment">// 0.325 * 1000</span></div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;  uint8_t CS = 31;</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;  uint32_t scaler = 0; <span class="comment">// = 256</span></div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160; </div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;  <span class="keyword">const</span> uint16_t RS_scaled = <a class="code" href="class_t_m_c_stepper.html#a14c403e6532fc10860f3accd9c5a5433">Rsense</a> * 0xFFFF; <span class="comment">// Scale to 16b</span></div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;  uint32_t numerator = 11585; <span class="comment">// 32 * 256 * sqrt(2)</span></div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;  numerator *= RS_scaled;</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;  numerator &gt;&gt;= 8;</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;  numerator *= mA;</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160; </div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;  <span class="keywordflow">do</span> {</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    uint32_t denominator = V_fs * 0xFFFF &gt;&gt; 8;</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    denominator *= CS+1;</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    scaler = numerator / denominator;</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160; </div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    <span class="keywordflow">if</span> (scaler &gt; 255) scaler = 0; <span class="comment">// Maximum</span></div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (scaler &lt; 128) CS--;  <span class="comment">// Try again with smaller CS</span></div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;  } <span class="keywordflow">while</span>(0 &lt; scaler &amp;&amp; scaler &lt; 128);</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160; </div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160; </div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;  <span class="keywordflow">if</span> (CS &gt; 31)</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    CS = 31;</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160; </div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;  <a class="code" href="class_t_m_c2160_stepper.html#a4dc485fd467892f35f98ad6ea30b6d21">GLOBAL_SCALER</a>(scaler);</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;  <a class="code" href="class_t_m_c_stepper.html#a89f965f7d005e189ef27951f37e699f2">irun</a>(CS);</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;  <a class="code" href="class_t_m_c_stepper.html#a5f7f8f6ce7b394449239bc2c05f39c8f">ihold</a>(CS*<a class="code" href="class_t_m_c_stepper.html#ab450b20e430d79770ab8d5af4cc977e8">holdMultiplier</a>);</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;}</div>
<div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="class_t_m_c2160_stepper.html#ae0ad4338d65b9a91e1c1c39ffaff8931">   95</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c2160_stepper.html#a05142aa741a7ebd105a13df39fba9d91">TMC2160Stepper::rms_current</a>(uint16_t mA, <span class="keywordtype">float</span> mult) {</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;  <a class="code" href="class_t_m_c_stepper.html#ab450b20e430d79770ab8d5af4cc977e8">holdMultiplier</a> = mult;</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;  <a class="code" href="class_t_m_c2160_stepper.html#a05142aa741a7ebd105a13df39fba9d91">rms_current</a>(mA);</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;}</div>
<div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="class_t_m_c2160_stepper.html#a6c84af7f87af2c616de8a6a288309ecb">   99</a></span>&#160;uint16_t <a class="code" href="class_t_m_c2160_stepper.html#a6c84af7f87af2c616de8a6a288309ecb">TMC2160Stepper::cs2rms</a>(uint8_t CS) {</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    uint16_t scaler = <a class="code" href="class_t_m_c2160_stepper.html#a4dc485fd467892f35f98ad6ea30b6d21">GLOBAL_SCALER</a>();</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    <span class="keywordflow">if</span> (!scaler) scaler = 256;</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    uint32_t numerator = scaler * (CS+1);</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    numerator *= 325;</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    numerator &gt;&gt;= (8+5); <span class="comment">// Divide by 256 and 32</span></div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    numerator *= 1000000;</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    uint32_t denominator = <a class="code" href="class_t_m_c_stepper.html#a14c403e6532fc10860f3accd9c5a5433">Rsense</a>*1000;</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    denominator *= 1414;</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160; </div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;    <span class="keywordflow">return</span> numerator / denominator;</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;}</div>
<div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="class_t_m_c2160_stepper.html#a05142aa741a7ebd105a13df39fba9d91">  111</a></span>&#160;uint16_t <a class="code" href="class_t_m_c2160_stepper.html#a05142aa741a7ebd105a13df39fba9d91">TMC2160Stepper::rms_current</a>() { <span class="keywordflow">return</span> <a class="code" href="class_t_m_c2160_stepper.html#a6c84af7f87af2c616de8a6a288309ecb">cs2rms</a>(<a class="code" href="class_t_m_c_stepper.html#a89f965f7d005e189ef27951f37e699f2">irun</a>()); }</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160; </div>
<div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="class_t_m_c2160_stepper.html#ae8035a0cb8151d5227d8528e540e637d">  113</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c2160_stepper.html#ae8035a0cb8151d5227d8528e540e637d">TMC2160Stepper::push</a>() {</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#aee84a9abfc84b387c6ae5658f90bf684">GCONF</a>(GCONF_register.sr);</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;  <a class="code" href="class_t_m_c_stepper.html#a597bc308bad0d1198b98c48a6ef34fc3">IHOLD_IRUN</a>(IHOLD_IRUN_register.sr);</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;  <a class="code" href="class_t_m_c_stepper.html#a66812c883dfbb6dedc046a011b2564be">TPOWERDOWN</a>(TPOWERDOWN_register.sr);</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;  <a class="code" href="class_t_m_c_stepper.html#ac59a9305aafc64a63698a34cac404788">TPWMTHRS</a>(TPWMTHRS_register.sr);</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#a5db9c2e01d8c1994a5c58d0bf0b1d9b1">TCOOLTHRS</a>(TCOOLTHRS_register.sr);</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#a8e7d22e8bc39e89b4a02ad1460e4cf25">THIGH</a>(THIGH_register.sr);</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#af486cd4712be021c735fc3bcb8eee9f5">XDIRECT</a>(XDIRECT_register.sr);</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#a4389f7f07c57d2267351b781c6031fb4">VDCMIN</a>(VDCMIN_register.sr);</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#a67541b27d97ce45f175e9f6e4a2d0bff">CHOPCONF</a>(CHOPCONF_register.sr);</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#abc48be984238d94bb3b72ed3aa26f028">COOLCONF</a>(COOLCONF_register.sr);</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#a1a90b2919efe61dd825552c2fbeca993">DCCTRL</a>(DCCTRL_register.sr);</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;  <a class="code" href="class_t_m_c2160_stepper.html#ae59c6240979e95e7b05074e20f3600de">PWMCONF</a>(PWMCONF_register.sr);</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;  <a class="code" href="class_t_m_c2160_stepper.html#afff5a7b8d79d2575ae5b3061e463ba3d">SHORT_CONF</a>(SHORT_CONF_register.sr);</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;  <a class="code" href="class_t_m_c2160_stepper.html#adce396d6676a252e87507a30ba44c693">DRV_CONF</a>(DRV_CONF_register.sr);</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;  <a class="code" href="class_t_m_c2160_stepper.html#a4dc485fd467892f35f98ad6ea30b6d21">GLOBAL_SCALER</a>(GLOBAL_SCALER_register.sr);</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;}</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160; </div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;<span class="comment">// R: IOIN</span></div>
<div class="line"><a name="l00133"></a><span class="lineno"><a class="line" href="class_t_m_c2160_stepper.html#a3d1beb78c3356e99799915df3b424e60">  133</a></span>&#160;uint32_t  <a class="code" href="class_t_m_c2160_stepper.html#a3d1beb78c3356e99799915df3b424e60">TMC2160Stepper::IOIN</a>() {</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;  <span class="keywordflow">return</span> <a class="code" href="class_t_m_c2130_stepper.html#aed0175bff6e80ebc14e0d2606283cbe0">read</a>(<a class="code" href="struct_t_m_c2160__n_1_1_i_o_i_n__t.html#a25a3e3ac8b01e6272a66e590819c8846">TMC2160_n::IOIN_t::address</a>);</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;}</div>
<div class="line"><a name="l00136"></a><span class="lineno"><a class="line" href="class_t_m_c2160_stepper.html#a81bb5dde2cee3025f797fc14365b3c92">  136</a></span>&#160;<span class="keywordtype">bool</span>    <a class="code" href="class_t_m_c2160_stepper.html#a81bb5dde2cee3025f797fc14365b3c92">TMC2160Stepper::refl_step</a>()      { <a class="code" href="struct_t_m_c2160__n_1_1_i_o_i_n__t.html">TMC2160_n::IOIN_t</a> r{0}; r.<a class="code" href="struct_t_m_c2160__n_1_1_i_o_i_n__t.html#af87984452b2d1ea969153f7321355202">sr</a> = <a class="code" href="class_t_m_c2160_stepper.html#a3d1beb78c3356e99799915df3b424e60">IOIN</a>(); <span class="keywordflow">return</span> r.refl_step; }</div>
<div class="line"><a name="l00137"></a><span class="lineno"><a class="line" href="class_t_m_c2160_stepper.html#a0afa417597993d7cb67ee0e56fcb3912">  137</a></span>&#160;<span class="keywordtype">bool</span>    <a class="code" href="class_t_m_c2160_stepper.html#a0afa417597993d7cb67ee0e56fcb3912">TMC2160Stepper::refr_dir</a>()       { <a class="code" href="struct_t_m_c2160__n_1_1_i_o_i_n__t.html">TMC2160_n::IOIN_t</a> r{0}; r.<a class="code" href="struct_t_m_c2160__n_1_1_i_o_i_n__t.html#af87984452b2d1ea969153f7321355202">sr</a> = <a class="code" href="class_t_m_c2160_stepper.html#a3d1beb78c3356e99799915df3b424e60">IOIN</a>(); <span class="keywordflow">return</span> r.refr_dir; }</div>
<div class="line"><a name="l00138"></a><span class="lineno"><a class="line" href="class_t_m_c2160_stepper.html#ac0dd7325f5a470ae0221d158b5303fbf">  138</a></span>&#160;<span class="keywordtype">bool</span>    <a class="code" href="class_t_m_c2160_stepper.html#ac0dd7325f5a470ae0221d158b5303fbf">TMC2160Stepper::encb_dcen_cfg4</a>() { <a class="code" href="struct_t_m_c2160__n_1_1_i_o_i_n__t.html">TMC2160_n::IOIN_t</a> r{0}; r.<a class="code" href="struct_t_m_c2160__n_1_1_i_o_i_n__t.html#af87984452b2d1ea969153f7321355202">sr</a> = <a class="code" href="class_t_m_c2160_stepper.html#a3d1beb78c3356e99799915df3b424e60">IOIN</a>(); <span class="keywordflow">return</span> r.encb_dcen_cfg4; }</div>
<div class="line"><a name="l00139"></a><span class="lineno"><a class="line" href="class_t_m_c2160_stepper.html#a8dbbafbbb879608efd8e37e1ab8d3d7e">  139</a></span>&#160;<span class="keywordtype">bool</span>    <a class="code" href="class_t_m_c2160_stepper.html#a8dbbafbbb879608efd8e37e1ab8d3d7e">TMC2160Stepper::enca_dcin_cfg5</a>() { <a class="code" href="struct_t_m_c2160__n_1_1_i_o_i_n__t.html">TMC2160_n::IOIN_t</a> r{0}; r.<a class="code" href="struct_t_m_c2160__n_1_1_i_o_i_n__t.html#af87984452b2d1ea969153f7321355202">sr</a> = <a class="code" href="class_t_m_c2160_stepper.html#a3d1beb78c3356e99799915df3b424e60">IOIN</a>(); <span class="keywordflow">return</span> r.enca_dcin_cfg5; }</div>
<div class="line"><a name="l00140"></a><span class="lineno"><a class="line" href="class_t_m_c2160_stepper.html#a857218511bf02eaada068d1bfd6b4c8d">  140</a></span>&#160;<span class="keywordtype">bool</span>    <a class="code" href="class_t_m_c2160_stepper.html#a857218511bf02eaada068d1bfd6b4c8d">TMC2160Stepper::drv_enn</a>()        { <a class="code" href="struct_t_m_c2160__n_1_1_i_o_i_n__t.html">TMC2160_n::IOIN_t</a> r{0}; r.<a class="code" href="struct_t_m_c2160__n_1_1_i_o_i_n__t.html#af87984452b2d1ea969153f7321355202">sr</a> = <a class="code" href="class_t_m_c2160_stepper.html#a3d1beb78c3356e99799915df3b424e60">IOIN</a>(); <span class="keywordflow">return</span> r.drv_enn; }</div>
<div class="line"><a name="l00141"></a><span class="lineno"><a class="line" href="class_t_m_c2160_stepper.html#a30f5e4b356b5a6ce5afa680e7a44b969">  141</a></span>&#160;<span class="keywordtype">bool</span>    <a class="code" href="class_t_m_c2160_stepper.html#a30f5e4b356b5a6ce5afa680e7a44b969">TMC2160Stepper::dco_cfg6</a>()       { <a class="code" href="struct_t_m_c2160__n_1_1_i_o_i_n__t.html">TMC2160_n::IOIN_t</a> r{0}; r.<a class="code" href="struct_t_m_c2160__n_1_1_i_o_i_n__t.html#af87984452b2d1ea969153f7321355202">sr</a> = <a class="code" href="class_t_m_c2160_stepper.html#a3d1beb78c3356e99799915df3b424e60">IOIN</a>(); <span class="keywordflow">return</span> r.dco_cfg6; }</div>
<div class="line"><a name="l00142"></a><span class="lineno"><a class="line" href="class_t_m_c2160_stepper.html#a5cf278ded4a10e6ff92b2011877b4f9d">  142</a></span>&#160;uint8_t <a class="code" href="class_t_m_c2160_stepper.html#a5cf278ded4a10e6ff92b2011877b4f9d">TMC2160Stepper::version</a>()        { <a class="code" href="struct_t_m_c2160__n_1_1_i_o_i_n__t.html">TMC2160_n::IOIN_t</a> r{0}; r.<a class="code" href="struct_t_m_c2160__n_1_1_i_o_i_n__t.html#af87984452b2d1ea969153f7321355202">sr</a> = <a class="code" href="class_t_m_c2160_stepper.html#a3d1beb78c3356e99799915df3b424e60">IOIN</a>(); <span class="keywordflow">return</span> r.version; }</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160; </div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;<span class="comment">// W: GLOBAL_SCALER</span></div>
<div class="line"><a name="l00145"></a><span class="lineno"><a class="line" href="class_t_m_c2160_stepper.html#a4dc485fd467892f35f98ad6ea30b6d21">  145</a></span>&#160;uint8_t <a class="code" href="class_t_m_c2160_stepper.html#a4dc485fd467892f35f98ad6ea30b6d21">TMC2160Stepper::GLOBAL_SCALER</a>() { <span class="keywordflow">return</span> GLOBAL_SCALER_register.sr; }</div>
<div class="line"><a name="l00146"></a><span class="lineno"><a class="line" href="class_t_m_c2160_stepper.html#a182c03c51d92c565b15b6e7e459e55ae">  146</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c2160_stepper.html#a4dc485fd467892f35f98ad6ea30b6d21">TMC2160Stepper::GLOBAL_SCALER</a>(uint8_t input) {</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;  GLOBAL_SCALER_register.sr = input;</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#a1f26f0ea072d38c0afd20f27563ebb64">write</a>(GLOBAL_SCALER_register.address, GLOBAL_SCALER_register.sr);</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;}</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160; </div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;<span class="comment">// R: OFFSET_READ</span></div>
<div class="line"><a name="l00152"></a><span class="lineno"><a class="line" href="class_t_m_c2160_stepper.html#a6e35363428a742e1e14cf225e683fa4c">  152</a></span>&#160;uint16_t <a class="code" href="class_t_m_c2160_stepper.html#a6e35363428a742e1e14cf225e683fa4c">TMC2160Stepper::OFFSET_READ</a>() { <span class="keywordflow">return</span> <a class="code" href="class_t_m_c2130_stepper.html#aed0175bff6e80ebc14e0d2606283cbe0">read</a>(<a class="code" href="struct_o_f_f_s_e_t___r_e_a_d__t.html#aee6d4b81eacdb57cd28383e5658f9d7a">OFFSET_READ_t::address</a>); }</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160; </div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;<span class="comment">// R: PWM_SCALE</span></div>
<div class="line"><a name="l00155"></a><span class="lineno"><a class="line" href="class_t_m_c2160_stepper.html#a105381369f3d6267e907ff4ea0b31aac">  155</a></span>&#160;uint32_t <a class="code" href="class_t_m_c2160_stepper.html#a105381369f3d6267e907ff4ea0b31aac">TMC2160Stepper::PWM_SCALE</a>() {</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;  <span class="keywordflow">return</span> <a class="code" href="class_t_m_c2130_stepper.html#aed0175bff6e80ebc14e0d2606283cbe0">read</a>(<a class="code" href="struct_t_m_c2160__n_1_1_p_w_m___s_c_a_l_e__t.html#a14de0a7677c89214fb72c16ca326dc9b">TMC2160_n::PWM_SCALE_t::address</a>);</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;}</div>
<div class="line"><a name="l00158"></a><span class="lineno"><a class="line" href="class_t_m_c2160_stepper.html#a5a7e05fecd47e292b496f9c07d2e7d7d">  158</a></span>&#160;uint8_t <a class="code" href="class_t_m_c2160_stepper.html#a5a7e05fecd47e292b496f9c07d2e7d7d">TMC2160Stepper::pwm_scale_sum</a>()   { <a class="code" href="struct_t_m_c2160__n_1_1_p_w_m___s_c_a_l_e__t.html">TMC2160_n::PWM_SCALE_t</a> r{0}; r.<a class="code" href="struct_t_m_c2160__n_1_1_p_w_m___s_c_a_l_e__t.html#ab313fff7cc90cc645db50e7723a5928c">sr</a> = <a class="code" href="class_t_m_c2160_stepper.html#a105381369f3d6267e907ff4ea0b31aac">PWM_SCALE</a>(); <span class="keywordflow">return</span> r.pwm_scale_sum; }</div>
<div class="line"><a name="l00159"></a><span class="lineno"><a class="line" href="class_t_m_c2160_stepper.html#aed84d0cf68f223e6e0a463bf489f05da">  159</a></span>&#160;uint16_t <a class="code" href="class_t_m_c2160_stepper.html#aed84d0cf68f223e6e0a463bf489f05da">TMC2160Stepper::pwm_scale_auto</a>() { <a class="code" href="struct_t_m_c2160__n_1_1_p_w_m___s_c_a_l_e__t.html">TMC2160_n::PWM_SCALE_t</a> r{0}; r.<a class="code" href="struct_t_m_c2160__n_1_1_p_w_m___s_c_a_l_e__t.html#ab313fff7cc90cc645db50e7723a5928c">sr</a> = <a class="code" href="class_t_m_c2160_stepper.html#a105381369f3d6267e907ff4ea0b31aac">PWM_SCALE</a>(); <span class="keywordflow">return</span> r.pwm_scale_auto; }</div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="astruct_o_f_f_s_e_t___r_e_a_d__t_html_aee6d4b81eacdb57cd28383e5658f9d7a"><div class="ttname"><a href="struct_o_f_f_s_e_t___r_e_a_d__t.html#aee6d4b81eacdb57cd28383e5658f9d7a">OFFSET_READ_t::address</a></div><div class="ttdeci">constexpr static uint8_t address</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c5160__bitfields_8h_source.html#l00041">TMC5160_bitfields.h:41</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html"><div class="ttname"><a href="class_t_m_c2130_stepper.html">TMC2130Stepper</a></div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8h_source.html#l00137">TMCStepper.h:137</a></div></div>
<div class="ttc" id="aclass_t_m_c2160_stepper_html_a4ba0721dce0f73b4438c497b27263543"><div class="ttname"><a href="class_t_m_c2160_stepper.html#a4ba0721dce0f73b4438c497b27263543">TMC2160Stepper::TMC2160Stepper</a></div><div class="ttdeci">TMC2160Stepper(uint16_t pinCS, float RS=default_RS, int8_t link_index=-1)</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2160_stepper_8cpp_source.html#l00004">TMC2160Stepper.cpp:4</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_ac34bf4add4f669e935f2a91e1b42817c"><div class="ttname"><a href="class_t_m_c2130_stepper.html#ac34bf4add4f669e935f2a91e1b42817c">TMC2130Stepper::toff</a></div><div class="ttdeci">uint8_t toff()</div><div class="ttdef"><b>Definition:</b> <a href="_c_h_o_p_c_o_n_f_8cpp_source.html#l00032">CHOPCONF.cpp:32</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_a8e7d22e8bc39e89b4a02ad1460e4cf25"><div class="ttname"><a href="class_t_m_c2130_stepper.html#a8e7d22e8bc39e89b4a02ad1460e4cf25">TMC2130Stepper::THIGH</a></div><div class="ttdeci">uint32_t THIGH()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00244">TMC2130Stepper.cpp:244</a></div></div>
<div class="ttc" id="aclass_t_m_c2160_stepper_html_a857218511bf02eaada068d1bfd6b4c8d"><div class="ttname"><a href="class_t_m_c2160_stepper.html#a857218511bf02eaada068d1bfd6b4c8d">TMC2160Stepper::drv_enn</a></div><div class="ttdeci">bool drv_enn()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2160_stepper_8cpp_source.html#l00140">TMC2160Stepper.cpp:140</a></div></div>
<div class="ttc" id="aclass_t_m_c2160_stepper_html_a81bb5dde2cee3025f797fc14365b3c92"><div class="ttname"><a href="class_t_m_c2160_stepper.html#a81bb5dde2cee3025f797fc14365b3c92">TMC2160Stepper::refl_step</a></div><div class="ttdeci">bool refl_step()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2160_stepper_8cpp_source.html#l00136">TMC2160Stepper.cpp:136</a></div></div>
<div class="ttc" id="aclass_t_m_c2160_stepper_html_adce396d6676a252e87507a30ba44c693"><div class="ttname"><a href="class_t_m_c2160_stepper.html#adce396d6676a252e87507a30ba44c693">TMC2160Stepper::DRV_CONF</a></div><div class="ttdeci">uint32_t DRV_CONF()</div><div class="ttdef"><b>Definition:</b> <a href="_d_r_v___c_o_n_f_8cpp_source.html#l00008">DRV_CONF.cpp:8</a></div></div>
<div class="ttc" id="aclass_t_m_c2160_stepper_html_afff5a7b8d79d2575ae5b3061e463ba3d"><div class="ttname"><a href="class_t_m_c2160_stepper.html#afff5a7b8d79d2575ae5b3061e463ba3d">TMC2160Stepper::SHORT_CONF</a></div><div class="ttdeci">uint32_t SHORT_CONF()</div><div class="ttdef"><b>Definition:</b> <a href="_s_h_o_r_t___c_o_n_f_8cpp_source.html#l00007">SHORT_CONF.cpp:7</a></div></div>
<div class="ttc" id="aclass_t_m_c2160_stepper_html_a4dc485fd467892f35f98ad6ea30b6d21"><div class="ttname"><a href="class_t_m_c2160_stepper.html#a4dc485fd467892f35f98ad6ea30b6d21">TMC2160Stepper::GLOBAL_SCALER</a></div><div class="ttdeci">uint8_t GLOBAL_SCALER()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2160_stepper_8cpp_source.html#l00145">TMC2160Stepper.cpp:145</a></div></div>
<div class="ttc" id="astruct_t_m_c2160__n_1_1_p_w_m___s_c_a_l_e__t_html_ab313fff7cc90cc645db50e7723a5928c"><div class="ttname"><a href="struct_t_m_c2160__n_1_1_p_w_m___s_c_a_l_e__t.html#ab313fff7cc90cc645db50e7723a5928c">TMC2160_n::PWM_SCALE_t::sr</a></div><div class="ttdeci">uint32_t sr</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2160__bitfields_8h_source.html#l00044">TMC2160_bitfields.h:44</a></div></div>
<div class="ttc" id="aclass_t_m_c2160_stepper_html_a30f5e4b356b5a6ce5afa680e7a44b969"><div class="ttname"><a href="class_t_m_c2160_stepper.html#a30f5e4b356b5a6ce5afa680e7a44b969">TMC2160Stepper::dco_cfg6</a></div><div class="ttdeci">bool dco_cfg6()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2160_stepper_8cpp_source.html#l00141">TMC2160Stepper.cpp:141</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_a1a90b2919efe61dd825552c2fbeca993"><div class="ttname"><a href="class_t_m_c2130_stepper.html#a1a90b2919efe61dd825552c2fbeca993">TMC2130Stepper::DCCTRL</a></div><div class="ttdeci">uint32_t DCCTRL()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00284">TMC2130Stepper.cpp:284</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_a4bf494535fd27013899cc325c8b7af4c"><div class="ttname"><a href="class_t_m_c2130_stepper.html#a4bf494535fd27013899cc325c8b7af4c">TMC2130Stepper::TMC_SW_SPI</a></div><div class="ttdeci">SW_SPIClass * TMC_SW_SPI</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8h_source.html#l00353">TMCStepper.h:353</a></div></div>
<div class="ttc" id="aclass_t_m_c2160_stepper_html_ae8035a0cb8151d5227d8528e540e637d"><div class="ttname"><a href="class_t_m_c2160_stepper.html#ae8035a0cb8151d5227d8528e540e637d">TMC2160Stepper::push</a></div><div class="ttdeci">void push()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2160_stepper_8cpp_source.html#l00113">TMC2160Stepper.cpp:113</a></div></div>
<div class="ttc" id="aclass_t_m_c2160_stepper_html_a5a7e05fecd47e292b496f9c07d2e7d7d"><div class="ttname"><a href="class_t_m_c2160_stepper.html#a5a7e05fecd47e292b496f9c07d2e7d7d">TMC2160Stepper::pwm_scale_sum</a></div><div class="ttdeci">uint8_t pwm_scale_sum()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2160_stepper_8cpp_source.html#l00158">TMC2160Stepper.cpp:158</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_abc48be984238d94bb3b72ed3aa26f028"><div class="ttname"><a href="class_t_m_c2130_stepper.html#abc48be984238d94bb3b72ed3aa26f028">TMC2130Stepper::COOLCONF</a></div><div class="ttdeci">uint32_t COOLCONF()</div><div class="ttdef"><b>Definition:</b> <a href="_c_o_o_l_c_o_n_f_8cpp_source.html#l00008">COOLCONF.cpp:8</a></div></div>
<div class="ttc" id="a_t_m_c_stepper_8h_html"><div class="ttname"><a href="_t_m_c_stepper_8h.html">TMCStepper.h</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_a14c403e6532fc10860f3accd9c5a5433"><div class="ttname"><a href="class_t_m_c_stepper.html#a14c403e6532fc10860f3accd9c5a5433">TMCStepper::Rsense</a></div><div class="ttdeci">const float Rsense</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8h_source.html#l00133">TMCStepper.h:133</a></div></div>
<div class="ttc" id="astruct_t_m_c2160__n_1_1_i_o_i_n__t_html_af87984452b2d1ea969153f7321355202"><div class="ttname"><a href="struct_t_m_c2160__n_1_1_i_o_i_n__t.html#af87984452b2d1ea969153f7321355202">TMC2160_n::IOIN_t::sr</a></div><div class="ttdeci">uint32_t sr</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2160__bitfields_8h_source.html#l00008">TMC2160_bitfields.h:8</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_a4389f7f07c57d2267351b781c6031fb4"><div class="ttname"><a href="class_t_m_c2130_stepper.html#a4389f7f07c57d2267351b781c6031fb4">TMC2130Stepper::VDCMIN</a></div><div class="ttdeci">uint32_t VDCMIN()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00264">TMC2130Stepper.cpp:264</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_aed8aa4583943e649dbf3bb1c1da90d63"><div class="ttname"><a href="class_t_m_c2130_stepper.html#aed8aa4583943e649dbf3bb1c1da90d63">TMC2130Stepper::switchCSpin</a></div><div class="ttdeci">void switchCSpin(bool state)</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00061">TMC2130Stepper.cpp:61</a></div></div>
<div class="ttc" id="aclass_t_m_c2160_stepper_html_ac0dd7325f5a470ae0221d158b5303fbf"><div class="ttname"><a href="class_t_m_c2160_stepper.html#ac0dd7325f5a470ae0221d158b5303fbf">TMC2160Stepper::encb_dcen_cfg4</a></div><div class="ttdeci">bool encb_dcen_cfg4()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2160_stepper_8cpp_source.html#l00138">TMC2160Stepper.cpp:138</a></div></div>
<div class="ttc" id="aclass_t_m_c2160_stepper_html_a0afa417597993d7cb67ee0e56fcb3912"><div class="ttname"><a href="class_t_m_c2160_stepper.html#a0afa417597993d7cb67ee0e56fcb3912">TMC2160Stepper::refr_dir</a></div><div class="ttdeci">bool refr_dir()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2160_stepper_8cpp_source.html#l00137">TMC2160Stepper.cpp:137</a></div></div>
<div class="ttc" id="aclass_t_m_c2160_stepper_html_ae59c6240979e95e7b05074e20f3600de"><div class="ttname"><a href="class_t_m_c2160_stepper.html#ae59c6240979e95e7b05074e20f3600de">TMC2160Stepper::PWMCONF</a></div><div class="ttdeci">uint32_t PWMCONF()</div><div class="ttdef"><b>Definition:</b> <a href="_p_w_m_c_o_n_f_8cpp_source.html#l00028">PWMCONF.cpp:28</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_ae54d816846ca2103976f490c5ab8e887"><div class="ttname"><a href="class_t_m_c2130_stepper.html#ae54d816846ca2103976f490c5ab8e887">TMC2130Stepper::tbl</a></div><div class="ttdeci">uint8_t tbl()</div><div class="ttdef"><b>Definition:</b> <a href="_c_h_o_p_c_o_n_f_8cpp_source.html#l00039">CHOPCONF.cpp:39</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_aed0175bff6e80ebc14e0d2606283cbe0"><div class="ttname"><a href="class_t_m_c2130_stepper.html#aed0175bff6e80ebc14e0d2606283cbe0">TMC2130Stepper::read</a></div><div class="ttdeci">uint32_t read(uint8_t addressByte)</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00065">TMC2130Stepper.cpp:65</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_aee84a9abfc84b387c6ae5658f90bf684"><div class="ttname"><a href="class_t_m_c2130_stepper.html#aee84a9abfc84b387c6ae5658f90bf684">TMC2130Stepper::GCONF</a></div><div class="ttdeci">uint32_t GCONF()</div><div class="ttdef"><b>Definition:</b> <a href="_g_c_o_n_f_8cpp_source.html#l00007">GCONF.cpp:7</a></div></div>
<div class="ttc" id="a_t_m_c___m_a_c_r_o_s_8h_html"><div class="ttname"><a href="_t_m_c___m_a_c_r_o_s_8h.html">TMC_MACROS.h</a></div></div>
<div class="ttc" id="astruct_t_m_c2160__n_1_1_p_w_m___s_c_a_l_e__t_html"><div class="ttname"><a href="struct_t_m_c2160__n_1_1_p_w_m___s_c_a_l_e__t.html">TMC2160_n::PWM_SCALE_t</a></div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2160__bitfields_8h_source.html#l00041">TMC2160_bitfields.h:41</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_a67541b27d97ce45f175e9f6e4a2d0bff"><div class="ttname"><a href="class_t_m_c2130_stepper.html#a67541b27d97ce45f175e9f6e4a2d0bff">TMC2130Stepper::CHOPCONF</a></div><div class="ttdeci">uint32_t CHOPCONF()</div><div class="ttdef"><b>Definition:</b> <a href="_c_h_o_p_c_o_n_f_8cpp_source.html#l00007">CHOPCONF.cpp:7</a></div></div>
<div class="ttc" id="aclass_t_m_c2160_stepper_html_a7ee48b042245ef5b3968b82029d1404c"><div class="ttname"><a href="class_t_m_c2160_stepper.html#a7ee48b042245ef5b3968b82029d1404c">TMC2160Stepper::begin</a></div><div class="ttdeci">void begin()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2160_stepper_8cpp_source.html#l00013">TMC2160Stepper.cpp:13</a></div></div>
<div class="ttc" id="aclass_t_m_c2160_stepper_html_a05142aa741a7ebd105a13df39fba9d91"><div class="ttname"><a href="class_t_m_c2160_stepper.html#a05142aa741a7ebd105a13df39fba9d91">TMC2160Stepper::rms_current</a></div><div class="ttdeci">uint16_t rms_current()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2160_stepper_8cpp_source.html#l00111">TMC2160Stepper.cpp:111</a></div></div>
<div class="ttc" id="aclass_t_m_c2160_stepper_html_aed84d0cf68f223e6e0a463bf489f05da"><div class="ttname"><a href="class_t_m_c2160_stepper.html#aed84d0cf68f223e6e0a463bf489f05da">TMC2160Stepper::pwm_scale_auto</a></div><div class="ttdeci">uint16_t pwm_scale_auto()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2160_stepper_8cpp_source.html#l00159">TMC2160Stepper.cpp:159</a></div></div>
<div class="ttc" id="aclass_t_m_c2160_stepper_html_a8dbbafbbb879608efd8e37e1ab8d3d7e"><div class="ttname"><a href="class_t_m_c2160_stepper.html#a8dbbafbbb879608efd8e37e1ab8d3d7e">TMC2160Stepper::enca_dcin_cfg5</a></div><div class="ttdeci">bool enca_dcin_cfg5()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2160_stepper_8cpp_source.html#l00139">TMC2160Stepper.cpp:139</a></div></div>
<div class="ttc" id="aclass_s_w___s_p_i_class_html_aa35a68a7e184e42445f391876e58dd68"><div class="ttname"><a href="class_s_w___s_p_i_class.html#aa35a68a7e184e42445f391876e58dd68">SW_SPIClass::init</a></div><div class="ttdeci">void init()</div><div class="ttdef"><b>Definition:</b> <a href="_s_w___s_p_i_8cpp_source.html#l00009">SW_SPI.cpp:9</a></div></div>
<div class="ttc" id="aclass_t_m_c2160_stepper_html_a6c84af7f87af2c616de8a6a288309ecb"><div class="ttname"><a href="class_t_m_c2160_stepper.html#a6c84af7f87af2c616de8a6a288309ecb">TMC2160Stepper::cs2rms</a></div><div class="ttdeci">uint16_t cs2rms(uint8_t CS)</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2160_stepper_8cpp_source.html#l00099">TMC2160Stepper.cpp:99</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_a89f965f7d005e189ef27951f37e699f2"><div class="ttname"><a href="class_t_m_c_stepper.html#a89f965f7d005e189ef27951f37e699f2">TMCStepper::irun</a></div><div class="ttdeci">uint8_t irun()</div><div class="ttdef"><b>Definition:</b> <a href="_i_h_o_l_d___i_r_u_n_8cpp_source.html#l00019">IHOLD_IRUN.cpp:19</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_a66812c883dfbb6dedc046a011b2564be"><div class="ttname"><a href="class_t_m_c_stepper.html#a66812c883dfbb6dedc046a011b2564be">TMCStepper::TPOWERDOWN</a></div><div class="ttdeci">uint8_t TPOWERDOWN()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8cpp_source.html#l00123">TMCStepper.cpp:123</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_a5db9c2e01d8c1994a5c58d0bf0b1d9b1"><div class="ttname"><a href="class_t_m_c2130_stepper.html#a5db9c2e01d8c1994a5c58d0bf0b1d9b1">TMC2130Stepper::TCOOLTHRS</a></div><div class="ttdeci">uint32_t TCOOLTHRS()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00237">TMC2130Stepper.cpp:237</a></div></div>
<div class="ttc" id="astruct_t_m_c2160__n_1_1_p_w_m___s_c_a_l_e__t_html_a14de0a7677c89214fb72c16ca326dc9b"><div class="ttname"><a href="struct_t_m_c2160__n_1_1_p_w_m___s_c_a_l_e__t.html#a14de0a7677c89214fb72c16ca326dc9b">TMC2160_n::PWM_SCALE_t::address</a></div><div class="ttdeci">constexpr static uint8_t address</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2160__bitfields_8h_source.html#l00042">TMC2160_bitfields.h:42</a></div></div>
<div class="ttc" id="astruct_t_m_c2160__n_1_1_i_o_i_n__t_html_a25a3e3ac8b01e6272a66e590819c8846"><div class="ttname"><a href="struct_t_m_c2160__n_1_1_i_o_i_n__t.html#a25a3e3ac8b01e6272a66e590819c8846">TMC2160_n::IOIN_t::address</a></div><div class="ttdeci">constexpr static uint8_t address</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2160__bitfields_8h_source.html#l00006">TMC2160_bitfields.h:6</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_a6d38cdca5d67036d37e2de754ad6a8e4"><div class="ttname"><a href="class_t_m_c2130_stepper.html#a6d38cdca5d67036d37e2de754ad6a8e4">TMC2130Stepper::_pinCS</a></div><div class="ttdeci">const uint16_t _pinCS</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8h_source.html#l00352">TMCStepper.h:352</a></div></div>
<div class="ttc" id="aclass_t_m_c2160_stepper_html_a3d1beb78c3356e99799915df3b424e60"><div class="ttname"><a href="class_t_m_c2160_stepper.html#a3d1beb78c3356e99799915df3b424e60">TMC2160Stepper::IOIN</a></div><div class="ttdeci">uint32_t IOIN()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2160_stepper_8cpp_source.html#l00133">TMC2160Stepper.cpp:133</a></div></div>
<div class="ttc" id="aclass_t_m_c2160_stepper_html_a6e35363428a742e1e14cf225e683fa4c"><div class="ttname"><a href="class_t_m_c2160_stepper.html#a6e35363428a742e1e14cf225e683fa4c">TMC2160Stepper::OFFSET_READ</a></div><div class="ttdeci">uint16_t OFFSET_READ()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2160_stepper_8cpp_source.html#l00152">TMC2160Stepper.cpp:152</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_a1f26f0ea072d38c0afd20f27563ebb64"><div class="ttname"><a href="class_t_m_c2130_stepper.html#a1f26f0ea072d38c0afd20f27563ebb64">TMC2130Stepper::write</a></div><div class="ttdeci">void write(uint8_t addressByte, uint32_t config)</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00148">TMC2130Stepper.cpp:148</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_ab450b20e430d79770ab8d5af4cc977e8"><div class="ttname"><a href="class_t_m_c_stepper.html#ab450b20e430d79770ab8d5af4cc977e8">TMCStepper::holdMultiplier</a></div><div class="ttdeci">float holdMultiplier</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8h_source.html#l00134">TMCStepper.h:134</a></div></div>
<div class="ttc" id="aclass_t_m_c2160_stepper_html_a105381369f3d6267e907ff4ea0b31aac"><div class="ttname"><a href="class_t_m_c2160_stepper.html#a105381369f3d6267e907ff4ea0b31aac">TMC2160Stepper::PWM_SCALE</a></div><div class="ttdeci">uint32_t PWM_SCALE()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2160_stepper_8cpp_source.html#l00155">TMC2160Stepper.cpp:155</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_a597bc308bad0d1198b98c48a6ef34fc3"><div class="ttname"><a href="class_t_m_c_stepper.html#a597bc308bad0d1198b98c48a6ef34fc3">TMCStepper::IHOLD_IRUN</a></div><div class="ttdeci">uint32_t IHOLD_IRUN()</div><div class="ttdef"><b>Definition:</b> <a href="_i_h_o_l_d___i_r_u_n_8cpp_source.html#l00008">IHOLD_IRUN.cpp:8</a></div></div>
<div class="ttc" id="aclass_t_m_c2160_stepper_html_a5cf278ded4a10e6ff92b2011877b4f9d"><div class="ttname"><a href="class_t_m_c2160_stepper.html#a5cf278ded4a10e6ff92b2011877b4f9d">TMC2160Stepper::version</a></div><div class="ttdeci">uint8_t version()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2160_stepper_8cpp_source.html#l00142">TMC2160Stepper.cpp:142</a></div></div>
<div class="ttc" id="aclass_t_m_c2160_stepper_html_a5e55442fa6cd92580197a8a0d34208b1"><div class="ttname"><a href="class_t_m_c2160_stepper.html#a5e55442fa6cd92580197a8a0d34208b1">TMC2160Stepper::defaults</a></div><div class="ttdeci">void defaults()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2160_stepper_8cpp_source.html#l00030">TMC2160Stepper.cpp:30</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_a5f7f8f6ce7b394449239bc2c05f39c8f"><div class="ttname"><a href="class_t_m_c_stepper.html#a5f7f8f6ce7b394449239bc2c05f39c8f">TMCStepper::ihold</a></div><div class="ttdeci">uint8_t ihold()</div><div class="ttdef"><b>Definition:</b> <a href="_i_h_o_l_d___i_r_u_n_8cpp_source.html#l00018">IHOLD_IRUN.cpp:18</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_ac59a9305aafc64a63698a34cac404788"><div class="ttname"><a href="class_t_m_c_stepper.html#ac59a9305aafc64a63698a34cac404788">TMCStepper::TPWMTHRS</a></div><div class="ttdeci">uint32_t TPWMTHRS()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8cpp_source.html#l00133">TMCStepper.cpp:133</a></div></div>
<div class="ttc" id="astruct_t_m_c2160__n_1_1_i_o_i_n__t_html"><div class="ttname"><a href="struct_t_m_c2160__n_1_1_i_o_i_n__t.html">TMC2160_n::IOIN_t</a></div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2160__bitfields_8h_source.html#l00005">TMC2160_bitfields.h:5</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_af486cd4712be021c735fc3bcb8eee9f5"><div class="ttname"><a href="class_t_m_c2130_stepper.html#af486cd4712be021c735fc3bcb8eee9f5">TMC2130Stepper::XDIRECT</a></div><div class="ttdeci">uint32_t XDIRECT()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00251">TMC2130Stepper.cpp:251</a></div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_94e7a0fbe7f8eaf7f05ee7b02c647e9f.html">source</a></li><li class="navelem"><a class="el" href="_t_m_c2160_stepper_8cpp.html">TMC2160Stepper.cpp</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
